package com.ruoyi.yn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.yn.domain.YnUserAddress;
import com.ruoyi.yn.vo.YnUserAddressVo;
import com.ruoyi.yn.mapper.YnUserAddressMapper;
import com.ruoyi.yn.service.IYnUserAddressService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户地址Service业务层处理
 *
 * @author Ming
 * @date 2023-04-24
 */
@Service
public class YnUserAddressServiceImpl extends ServiceImpl<YnUserAddressMapper, YnUserAddress> implements IYnUserAddressService {

    @Override
    public TableDataInfo<YnUserAddressVo> queryList(YnUserAddressVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<YnUserAddressVo> queryAll(YnUserAddressVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public YnUserAddressVo queryById(String id) {
        return this.baseMapper.queryById(id);
    }
}
